﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;
namespace ClassSystem
{
    public partial class ASPStudentchengji : System.Web.UI.Page
    {
        AchilveBLL bll = new AchilveBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Label1.Text = DateTime.Now.ToString();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            
            int StudentIDs = Convert.ToInt32(this.TextBox2.Text.Trim());
            List<AchileModel> list = bll.GetListAll().Where(a=>a.StudentIDs == StudentIDs).ToList();
            if (list != null)
            {
                this.Repeater1.DataSource = list;
                this.Repeater1.DataBind();
            }
            if (list.Count == 0)
            {
                Response.Write("<script>alert('查询失败！')</script>");
            }
        }
    }
}